<?php
  require_once('recaptchalib.php');
  $privatekey = "6Ld949sSAAAAAKMEhxluuC9YsrpjPuNctzjkp4N9";
  $resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
    // What happens when the CAPTCHA was entered incorrectly
 //   die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
  //       "(reCAPTCHA said: " . $resp->error . ")");
	header("Location: /SAIS/index.php?error=captcha");
  } else {
    // Your code here to handle a successful verification
	header("Location: /SAIS/student.php");	//user page
  }
?>

<html>
	<head>
    	<title>Verifying....</title>
    </head>
	<body>
    </body>
</html>

